package com.helper.dream.a361phonehelper.utils;

import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.Drawable;

/**
 * Created by Administrator on 2016/12/19.
 */

public class ShowAnimation {

    public AnimationDrawable getAnimation(int startId, int endId, Context context){
        AnimationDrawable animationDrawable = new AnimationDrawable();
        for(int i = startId; i < endId; i ++){
            Drawable drawable = context.getResources().getDrawable(i);
            animationDrawable.addFrame(drawable, 150);
        }
        animationDrawable.setOneShot(false);
        return animationDrawable;

    }
}
